<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="${ctxStatic }/mui/css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" href="${ctxStatic }/wx/css/AAcars.css" />
<style>
		body{
			background: #F5F5F5;
		}
		.mui-table-view{
			background: none;
		}
		.mui-table-view-cell{
	       margin-top: 5px;
	       background: #fff;
	       box-shadow: 0px 3px 5px #ccc;
         }
        .mui-table-view-cell:after{
        	background: none;
        }
        .mui-table-view:before{
        	background: none;
        }
          .mui-table-view:after{
        	background: none;
        }
        .mui-table-view-cell>a:not(.mui-btn){
        	white-space:initial;
        }
        .aacar_place{
        	line-height: 38px;
        	text-align: center;
        	font-size: 14px;
        	background: #fff;
        }
	</style>
	<body>
		<div id="AAcars">
			<div class="mui-navbar-inner mui-bar mui-bar-nav" style="background: #16C59B;">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left" style="color: #fff;">
					<span class="mui-icon mui-icon-left-nav"  style="color: #fff;"></span>
				</button>
				<h1 class="mui-center mui-title" style="color: #fff;">拼车列表</h1>
			</div>
			<div class="mui-content">
			<div class="aacar_wrap">
                  <div class="aacar_banner">
                  	  <img src="${ctxStatic }/wx/img/day_img/aa.jpg" />
                  </div>
                  <div class="aacar_choice">
                  	  <div class="mui-row">
                  	  	    <div class="mui-col-xs-6 hoder_aa" style="border-right: 1px solid #C8C7CC;">
                  	  	    	         <div class="aacar_place ">
                                              <span>出发地</span>
                                               <span><c:if test="${not empty departName }"> ${departName } </c:if>  
				 	 	   	     		  	<c:if test="${empty departName }">不限</c:if>  </span>
                                               <i class="mui-icon mui-icon-arrowdown aacars_posi"></i>
                  	  	    	         </div>
                  	  	    	  <ul class="mui-table-view aacars_dlists">
                  	  	    	           <li class="aacars_pm trip_tit_n">
                  	  	    	          	     <span>出发地</span>
                                                 <span>不限</span>
                  	  	    	          </li>
                  	  	    	          <c:forEach items="${departSet}" var="index">
                  	  	    	          <li class="aacars_pm trip_tit_n" value="${index.siteid}">
                  	  	    	          	${index.sitename}
                  	  	    	          </li>
                  	  	    	          </c:forEach>
                  	  	    	     </ul>
                  	  	    </div>
                  	  	    <div class="mui-col-xs-6 hoder_aa">
                  	  	    	          <div class="aacar_place">
                                               <span>目的地</span>
                                               <span><c:if test="${not empty destName }"> ${destName } </c:if>  
				 	 	   	     		  	<c:if test="${empty destName }">不限</c:if>  </span>
                  	  	    	          </div>
                  	  	    	 <ul class="mui-table-view aacars_dlists">
                  	  	    	          <li class="aacars_pm trip_tit_m">
                  	  	    	          	       <span>目的地</span>
                                                  <span>不限</span>
                  	  	    	          </li>
                  	  	    	          <c:forEach items="${destSet}" var="index">
                  	  	    	          <li class="aacars_pm trip_tit_m" value="${index.siteid}">
                  	  	    	          	 	${index.sitename}
                  	  	    	          </li>
                  	  	    	           </c:forEach>
                  	  	    	     </ul>
                  	  	    	 <i class="mui-icon mui-icon-arrowdown aacars_posi"></i>
                  	  	    </div>
                  	  </div>
                  </div>
                  <ul class="mui-table-view" style="width: 100%;float: left;z-index: 22;">
                  	 <c:forEach items="${shareList}" var="index">
                      <li class="mui-table-view-cell mui-media">
                          <a href="${ctxWx}/share/getShareDetailById?sid=${index.sid}">
                              <div class="mui-row">
                                 <div class="mui-col-xs-6 aacars_img">
                                 		<img src="${index.linepic}">
                                 </div>
                                  <div class="mui-col-xs-6 mui-media-body">
                                      <p class="aa_cars_tit">${index.productname}</p>
                                      <div class="aa_cars_txt">
                                      	<p class="aacar_h_time">
                                      		<span>
                                      		    <img src="${ctxStatic }/wx/img/day_img/time@2x.png"/>
                                      		</span>
                                      		<span>${index.fromdateStr}</span>
                                      	</p>
                                      	<p class="aacar_h_date">
                                      		<span>
                                      			<img src="${ctxStatic }/wx/img/day_img/people@2x.png" />
                                      		</span>
                                      		<span>
                                      			<font style="color: #16C59B;">${index.currentsell}</font>/${index.minamount}
                                      		</span>
                                      		<span style="float: right;">￥${index.avgprice}/人</span>
                                      	</p>
                                      </div>
                                 </div>
                             </div>
                          </a>
                      </li>
                       </c:forEach>
                  </ul>
                  <form id="subForm" action="${ctxWx}/share/shareList">
        <input id="departsite" name="departsite" type="hidden" value="${departId }" /> 
		<input id="destsite" name="destsite" type="hidden" value="${destId }"/>
		</form>
			</div>
		   </div>
		</div>
		<script type="text/javascript" src="${ctxStatic }/zepto/zepto.min.js" ></script>
		<script src="${ctxStatic }/mui/js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			Zepto(function(){
				//没有产品
				var mes = "${mes}";
				if(mes.length>0){
					mui.alert(mes);
				}
				$('.aacar_place').on('tap',function(){
					$(this).siblings('ul').children('.aacars_pm').toggle().parents('.hoder_aa').siblings().find('.aacars_pm').hide();
				})
				$('.aacars_pm').on('tap',function(){
				    var  txtit=$(this).text();
				    $(this).parent().siblings('.aacar_place').text(txtit).parents('.hoder_aa').siblings().find('.aacars_pm').hide();
				});
				$('.trip_tit_n').on('tap',function(){
					    var  txtit=$(this).val();
					    $('#departsite').val(txtit);
					    $('#subForm').submit();
				});
				$('.trip_tit_m').on('tap',function(){
					    var  txtit=$(this).val();
					   $('#destsite').val(txtit);
					   $('#subForm').submit();
				});
			})
		</script>
	</body>
</html>
